package com.atguigu.gmall.item.service;

import java.util.concurrent.TimeUnit;

/**
 * @author:ahang
 * @create:2022-10-17 23:18
 * @Description:
 */
public interface CacheOpsService {
    /**
     * 查缓存
     * @param key
     * @param
     * @return
     */
    <T> T getCacheData(String key, Class<T> Clazz);

    /**
     * 放缓存
     * @param
     * @param
     */
    void setDate(String key, Object object, Long ttl, TimeUnit timeUnit);
}
